<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>论文专家审批</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<style>
table label.error {
	margin-left: 5px;
	width: auto;
	display: inline;
	color: red;
}

.textat {
	text-align: center;
}
</style>
</head>
<body onload="javascript:viewOrEdit();">
	<form action="#" name="Form" id="Form" method="post">
		<input type="hidden" id="lwid" name="lwid"
			value="${teacherThesis.lwid}" /> <input type="hidden" id="groupid"
			name="groupid" value="${teacherThesis.groupid}" />
		<input type="hidden" id="zjid" name="zjid" value="${zjid}" />
		<div id="view">
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="4">论文审批</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">论文题目：</td>
					<td class="table-contentTD" style="width: 35%">${teacherThesis.subject}</td>
					<td class="table-titleTD" style="width: 15%">论文时间：</td>
					<td class="table-contentTD" style="width: 35%">
					${teacherThesis.lwsj}
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">提交人：</td>
					<td class="table-contentTD" style="width: 35%">
						${teacherThesis.empName}</td>
					<td class="table-titleTD" style="width: 15%">提交日期：</td>
					<td class="table-contentTD" style="width: 35%"><fmt:formatDate
							value="${teacherThesis.createTime}" pattern="yyyy-MM-dd hh:mm:ss" />
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">备注：</td>
					<td class="table-contentTD" colspan="3"><textarea
							style="width: 70%; height: 80px;" disabled="disabled">${teacherThesis.remark}</textarea>
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">附件：</td>
					<td class="table-contentTD" colspan="3">
						<table style="width: 100%" cellpadding="0" cellspacing="0"
							border="0" class="table-border">
							<td class="table-titleTD" style="text-align: center;">序号</td>
							<td class="table-titleTD" style="text-align: center;">文件名称</td>
							<td class="table-titleTD" style="text-align: center;">文件大小</td>
							<td class="table-titleTD" style="text-align: center;">操作</td>
						    <c:if test="${not empty teacherThesisAttList}">
							<c:forEach items="${teacherThesisAttList}" var="teacherThesisAtt"
								varStatus="status">
								<tr>
									<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
									<td class="table-contentTD" style="text-align: center;">${teacherThesisAtt.fileName}</td>
									<td class="table-contentTD" style="text-align: center;">${teacherThesisAtt.fileSize}</td>
									<td class="table-contentTD" style="text-align: center;"><a
										href="${basePath}/uploadFile?filename=${teacherThesisAtt.fileName}&filepath=${teacherThesisAtt.filePath}&contentType=${teacherThesisAtt.contentType}">下载</a>
								</tr>
							</c:forEach>
							</c:if>
						</table>
					</td>
				</tr>
			</table>
			<br />
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="4">审核意见</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">评审人：</td>
					<td class="table-contentTD" style="width: 35%">${ktglTeacherThesisReview.reviewername}</td>
					<td class="table-titleTD" style="width: 15%">评审时间：</td>
					<td class="table-contentTD" style="width: 35%"><fmt:formatDate
							value="${ktglTeacherThesisReview.reviewtime}"
							pattern="yyyy-MM-dd hh:mm" /></td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">成绩等级：</td>
					<td class="table-contentTD" colspan="3">${ktglTeacherThesisReview.scoregrade}</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">评审意见：</td>
					<td class="table-contentTD" colspan="3"><textarea
							style="width: 70%; height: 80px;" disabled="disabled">${ktglTeacherThesisReview.reviewcomments}</textarea></td>
				</tr>
			</table>
		</div>

		<div id="edit" style="display: none;">
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="4">论文审批</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">论文题目：</td>
					<td class="table-contentTD" style="width: 35%">${teacherThesis.subject}</td>
					<td class="table-titleTD" style="width: 15%">论文时间：</td>
					<td class="table-contentTD" style="width: 35%">
					${teacherThesis.lwsj}</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">提交人：</td>
					<td class="table-contentTD" style="width: 35%">
						${teacherThesis.empName}</td>
					<td class="table-titleTD" style="width: 15%">提交日期：</td>
					<td class="table-contentTD" style="width: 35%"><fmt:formatDate
							value="${teacherThesis.createTime}" pattern="yyyy-MM-dd hh:mm:ss" />
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">备注：</td>
					<td class="table-contentTD" colspan="3"><textarea
							style="width: 70%; height: 80px;" disabled="disabled">${teacherThesis.remark}</textarea>
					</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">附件：</td>
					<td class="table-contentTD" colspan="3">
						<table style="width: 100%" cellpadding="0" cellspacing="0"
							border="0" class="table-border">
							<td class="table-titleTD" style="text-align: center;">序号</td>
							<td class="table-titleTD" style="text-align: center;">文件名称</td>
							<td class="table-titleTD" style="text-align: center;">文件大小</td>
							<td class="table-titleTD" style="text-align: center;">操作</td>
							<c:forEach items="${teacherThesisAttList}" var="teacherThesisAtt"
								varStatus="status">
								<tr>
									<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
									<td class="table-contentTD" style="text-align: center;">${teacherThesisAtt.fileName}</td>
									<td class="table-contentTD" style="text-align: center;">${teacherThesisAtt.fileSize}</td>
									<td class="table-contentTD" style="text-align: center;"><a
										href="${basePath}/uploadFile?filename=${teacherThesisAtt.fileName}&filepath=${teacherThesisAtt.filePath}&contentType=${teacherThesisAtt.contentType}">下载</a>
								</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
			</table>
			<br />
			<table cellpadding="0" cellspacing="0" border="0"
				class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="4">审核意见</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%">评审人：</td>
					<td class="table-contentTD" style="width: 35%">${ktglTeacherThesisReview.reviewername}
						<input type="hidden" id="reviewerid" name="reviewerid"
						value="${ktglTeacherThesisReview.reviewerid}" /> <input
						type="hidden" id="reviewername" name="reviewername"
						value="${ktglTeacherThesisReview.reviewername}" />
					</td>
					<td class="table-titleTD" style="width: 15%">评审时间：</td>
					<td class="table-contentTD" style="width: 35%"><fmt:formatDate
							value="${currentDate}"
							pattern="yyyy-MM-dd hh:mm" /> <input type="hidden" id="pssj"
						name="pssj" value="${ktglTeacherThesisReview.pssj}" /></td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%"><font
						style="color: red;">*</font>成绩等级：</td>
					<td class="table-contentTD" colspan="3" style="width: 35%"><select id="scoregrade" name="scoregrade" class="required selectList" style="width: 300px;" placeholder="请选择成绩等级">
							<option value="">请选择</option>
							<option value="优秀">优秀</option>
							<option value="良好">良好</option>
							<option value="合格">合格</option>
							<option value="不合格">不合格</option>
					</select></td>
				</tr>
				<tr>
					<td class="table-titleTD" style="width: 15%"><font style="color: red;">*</font>评审意见：</td>
					<td class="table-contentTD" colspan="3"><textarea id="reviewcomments" name="reviewcomments" class="required"
							style="width: 70%; height: 80px;">${ktglTeacherThesisReview.reviewcomments}</textarea></td>
				</tr>
			</table>
		</div>
		<br />
		<div id="button-view">
			<table cellpadding="1" cellspacing="1" border="0" align="left">
				<tr>
					<%-- 			<kl:permission permisstionList="${permisstionList}" --%>
					<%-- 						currentUser="${_login_console_user}" --%>
					<%-- 						currentCatalogId="<%=CatalogUtils.getCatalogId("catalog0")%>" key="modify"> --%>
					<td><input type="button" id="btnEdit" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="评审"
						onclick="javascript:gotoEditPage();" /></td>
					<%-- 		   </kl:permission> --%>
					<td><input type="button" id="btnBack" autocomplete="off"  class="inputButton"
						value="返回" style="text-align: center;" /></td>
				</tr>
			</table>
		</div>
		<div id="button-edit">
			<table cellpadding="1" cellspacing="1" border="0" align="left">
				<tr>
					<td><input type="button" id="btnSave" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="保存" /></td>
					<td><input type="button" id="cancelSave" autocomplete="off"  class="inputButton"
						style="text-align: center;" value="取消"
						onclick="javascript:gotoViewPage();" /></td>
					<td><input type="button" id="btnBack2" autocomplete="off"  class="inputButton"
						value="返回" style="text-align: center;" /></td>
				</tr>
			</table>
		</div>	
	</form>
	<script>
		$(document)
				.ready(
						function() {
							var _form = $("#Form").validate();
							//返回
							$('#btnBack').click(function() {
								document.Form.action = "${basePath}/teacherReviewGroup/indexTeacherThesisReview";
								document.Form.submit();
											
						  });
							//返回
							$('#btnBack2').click(function() {
								document.Form.action = "${basePath}/teacherReviewGroup/indexTeacherThesisReview";
								document.Form.submit();
											
						  });
							//保存
							$("#btnSave").click(function() {
							  if (_form.form()) {
							    document.Form.action = "${basePath}/teacherReviewGroup/modiftyTeacherThesisReviewAudit";
							    document.Form.submit();
								}
							 });

							
						});
		if ("${msg}" != "") {
			layer.alert("${msg}", {
				icon : 6
			});
		}
		compareListValue(document.getElementById('scoregrade'),'${ktglTeacherThesisReview.scoregrade}');
	</script>
</body>
</html>